<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateChannelReportTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('channel_report', function (Blueprint $table) {
            $table->increments('id');
            $table->string('channel_num')->unique()->default('')->comment('渠道编号');
            $table->string('channel_name')->default('')->comment('渠道名称');
            $table->integer('today_install')->comment('今日安装');
            $table->integer('active_reg')->comment('活跃注册');
            $table->integer('active_tourist')->comment('活跃游客');
            $table->integer('pv')->comment('PV');
            $table->integer('uv')->comment('UV');
            $table->integer('active_ip')->comment('活跃IP');
            $table->integer('oneday_keep')->comment('1日留存');
            $table->integer('sevenday_keep')->comment('7日留存');
            $table->integer('thirtyday_keep')->comment('30日留存');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('channel_report');
    }
}
